// 进度条
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import router from './index'

NProgress.configure({
  easing: 'ease',
  speed: 500,
  showSpinner: false
})

router.beforeEach((to, from, next) => {
  NProgress.start()
  next()
})

router.afterEach(to => {
  document.title = to.meta.title ? to.meta.title : ''
  NProgress.done()
})
